<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_course_evaluate".
 *
 * @property string $id 主键
 * @property int $score 星数
 * @property string $content 内容
 * @property string $type 评价类型
 * @property string $object_id 对象id
 * @property string $status 状态
 * @property string $course_id 课程id
 * @property int $praise 点赞数
 * @property string $create_by 评价者
 * @property string $create_time 评价时间
 * @property int $del_flag 删除标志
 */
class TCourseEvaluate extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_course_evaluate';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['score', 'praise', 'del_flag'], 'integer'],
            [['id','course_id'], 'required'],
            [['create_time'], 'safe'],
            [['type', 'status'], 'string', 'max' => 64],
            [['content'], 'string', 'max' => 300],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'score' => 'Score',
            'content' => 'Content',
            'type' => 'Type',
            'object_id' => 'Object ID',
            'status' => 'Status',
            'course_id' => 'Course ID',
            'praise' => 'Praise',
            'create_by' => 'Create By',
            'create_time' => 'Create Time',
            'del_flag' => 'Del Flag',
        ];
    }
}
